package Internet.Zubo;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;

public class Send {
    public static void main(String[] args) throws IOException {
        MulticastSocket ms = new MulticastSocket();
        String s = "你好，你好！";
        byte[]bytes = s.getBytes();
        InetAddress address = InetAddress.getByName("224.0.0.1");
        int port = 10000;
        DatagramPacket dp = new DatagramPacket(bytes,bytes.length,address,port);
        ms.send(dp);
        ms.close();
    }
}
